package tdt4240.iddqd;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Typeface font = Typeface.createFromAsset(getAssets(), Constants.FONT_ZELDA_TERMINAL);
		TextView playGameButton = (TextView)findViewById(R.id.mainMenuPlayGame);
		playGameButton.setTypeface(font);

		TextView loadGameButton = (TextView)findViewById(R.id.mainMenuLoadGame);
		loadGameButton.setTypeface(font);

		TextView settingsButton = (TextView)findViewById(R.id.mainMenuSettings);
		settingsButton.setTypeface(font);
	}

	public void playGameButton(View view) {
		Intent playGameIntent = new Intent(this, GameActivity.class);
		playGameIntent.putExtra(Constants.GAME_TYPE, Constants.GAME_NEW);
		startActivity(playGameIntent);
	}
	
	public void loadGameButton(View view) {
		Intent loadGameIntent = new Intent(this, GameActivity.class);
		loadGameIntent.putExtra(Constants.GAME_TYPE, Constants.GAME_CONTINUE);
		startActivity(loadGameIntent);
	}
}